// Author: Domien Nowicki

#ifndef GAME_H
#define GAME_H

#include "Province.h"
#include "Player.h"
#include "Color.h"
#include "Properties.h"

// Base class for making a map coloring game
class Game
{
public:

	// Constructors
	Game(const Properties& properties);
	Game(const Game& rhs);

	// Destructor
	virtual ~Game();

	// Interface
	virtual void Start();
	virtual void Stop();

	virtual void Started();
	virtual void Stopped();

	// Operations to show output to the user
	virtual void Output(std::string message);
	virtual void ShowPlayerStepCount(int steps);

	virtual void EndGame(const Player *player);
	virtual bool DoMove(Player *player, const Move& move);

	// Operation to call after each move
	virtual void SwitchTurn();

	// Operations for a player to call
	virtual void ColorMap();
	virtual void Hint();
	


	// Properties for this game (number of colors, and color table)
	const Properties& GetProperties();

	// Test if the game is active
	bool IsActive() const;

	// Operations on the color map state
	void SetColoringMap(bool state);
	bool IsColoringMap() const;

	// Allow functions for hints, or coloring the map
	void SetAllowHints(bool state);
	void SetAllowColorMap(bool state);
	bool isHintsAllowed() const;
	bool isColorMapAllowed() const;
	
private:
	std::string GetPlayerPrefix(const Player* player) const;

	bool active;
	bool coloringMap;
	bool allowHints, allowColorMap;
	Properties properties;


};

#endif //GAME_H